<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Getting Started</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../index.html" title="ODTONE 0.3">
<link rel="up" href="../index.html" title="ODTONE 0.3">
<link rel="prev" href="intro.html" title="Introduction">
<link rel="next" href="library.html" title="Libraries">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="'ODTONE - Open Dot Twenty One'" width="100" height="100" src=".././images/logo.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="intro.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="library.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Getting Started">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="odtone.getStart"></a><a class="link" href="getStart.html" title="Getting Started"> Getting Started</a>
</h2></div></div></div>
<a name="odtone.getStart.installation"></a><h2>
<a name="id2990476"></a>
      <a class="link" href="getStart.html#odtone.getStart.installation">Installation</a>
    </h2>
<p>
      As ODTONE is developed in order to work in several platforms, we therefore
      won't provide detailed tutorials for each mainstream operating system. We will
      rather present the main guidelines for installing ODTONE and any relevant notes
      on specific platforms that might prove an obstacle.
    </p>
<a name="odtone.getStart.1__required_dependencies"></a><h4>
<a name="id2989410"></a>
      <a class="link" href="getStart.html#odtone.getStart.1__required_dependencies">1. Required Dependencies</a>
    </h4>
<p>
      In order to correctly use ODTONE, you must first make sure that you have the
      required dependencies installed:
    </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
<span class="bold"><strong>Boost Developer libraries (v1.42):</strong></span> If you
        do not already have them in your system, you can go to <a href="http://www.boost.org/" target="_top">boost's
        website</a> and download a more recent version of the Boost libraries.
      </li></ul></div>
<a name="odtone.getStart.1_1__boost_library_quick_guide"></a><h5>
<a name="id2989456"></a>
      <a class="link" href="getStart.html#odtone.getStart.1_1__boost_library_quick_guide">1.1. Boost Library
      Quick Guide</a>
    </h5>
<p>
      The Boost library is required to compile ODTONE, so in order to correctly use
      ODTONE you must first make sure you have Boost library installed.
    </p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
        Download the Boost library(v1.42) <a href="http://www.boost.org/" target="_top">boost's
        website</a> and unpack it.
      </li>
<li class="listitem">
        Install Boost.Jam (if your already have it, skip this step). You can either
        use the bootstrap script from the Boost library sources and then copy the
        resulting binary to a proper place (within your $PATH). Or, you can download
        a pre-built binary from <a href="http://www.boost.org/" target="_top">boost's website</a>.
      </li>
<li class="listitem">
        Setup Boost.Build (if your already have it, skip this step). Here's an example
        how to setup it:
      </li>
</ol></div>
<div class="table">
<a name="odtone.getStart.setup_boost_build_jam"></a><p class="title"><b>Table&#160;1.&#160;Setup boost-build.jam</b></p>
<div class="table-contents"><table class="table" summary="Setup boost-build.jam">
<colgroup>
<col>
<col>
</colgroup>
<tbody><tr>
<td>
          <p>
            boost-build.jam
          </p>
          </td>
<td>
          <p>
            
</p>
<pre class="programlisting"><span class="error">#</span><span class="special">==============================================================================</span>
<span class="preprocessor"># Put</span> <span class="identifier">his</span> <span class="identifier">file</span> <span class="identifier">at</span> <span class="identifier">the</span> <span class="identifier">root</span> <span class="identifier">directory</span> <span class="identifier">of</span> <span class="identifier">your</span> <span class="identifier">project</span> <span class="keyword">or</span> <span class="identifier">in</span> <span class="identifier">any</span> <span class="identifier">of</span> <span class="identifier">its</span> <span class="identifier">parent</span>
<span class="preprocessor"># directories</span><span class="special">.</span> <span class="identifier">Replace</span> <span class="char">'path-to-boost'</span> <span class="identifier">with</span> <span class="identifier">the</span> <span class="identifier">proper</span> <span class="identifier">path</span><span class="special">.</span>
<span class="error">#</span>
<span class="preprocessor"># See</span> <span class="identifier">the</span> <span class="identifier">Boost</span><span class="special">.</span><span class="identifier">Build</span> <span class="identifier">documentation</span> <span class="keyword">for</span> <span class="identifier">more</span> <span class="identifier">details</span><span class="special">!</span>
<span class="error">#</span><span class="special">==============================================================================</span>

<span class="identifier">boost</span><span class="special">-</span><span class="identifier">build</span> <span class="identifier">path</span><span class="special">-</span><span class="identifier">to</span><span class="special">-</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">tools</span><span class="special">/</span><span class="identifier">build</span><span class="special">/</span><span class="identifier">v2</span> <span class="special">;</span>
        </pre>
<p>
          </p>
          </td>
</tr></tbody>
</table></div>
</div>
<br class="table-break"><p>
      Before compiling ODTONE you must configure the Boost library in your user-config.jam.
      Here's an example how to configure it:
    </p>
<div class="table">
<a name="odtone.getStart.setup_user_config_jam"></a><p class="title"><b>Table&#160;2.&#160;Setup user-config.jam</b></p>
<div class="table-contents"><table class="table" summary="Setup user-config.jam">
<colgroup>
<col>
<col>
</colgroup>
<tbody><tr>
<td>
          <p>
            user-config.jam
          </p>
          </td>
<td>
          <p>
            
</p>
<pre class="programlisting"><span class="error">#</span><span class="special">==============================================================================</span>
<span class="preprocessor"># You</span> <span class="identifier">must</span> <span class="identifier">add</span> <span class="identifier">these</span> <span class="identifier">configurations</span> <span class="identifier">to</span> <span class="identifier">your</span> <span class="identifier">user</span><span class="special">-</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">jam</span> <span class="keyword">or</span> <span class="identifier">site</span><span class="special">-</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">jam</span>
<span class="preprocessor"># Replace</span> <span class="char">'path-to-xxx'</span> <span class="identifier">with</span> <span class="identifier">the</span> <span class="identifier">proper</span> <span class="identifier">path</span><span class="special">.</span>
<span class="error">#</span>
<span class="preprocessor"># See</span> <span class="identifier">the</span> <span class="identifier">Boost</span><span class="special">.</span><span class="identifier">Build</span> <span class="identifier">documentation</span> <span class="keyword">for</span> <span class="identifier">more</span> <span class="identifier">details</span><span class="special">!</span>
<span class="error">#</span><span class="special">==============================================================================</span>

<span class="keyword">using</span> <span class="identifier">boost</span>
	<span class="special">:</span> <span class="number">1.42</span>
	<span class="special">:</span> <span class="special">&lt;</span><span class="identifier">root</span><span class="special">&gt;</span><span class="identifier">path</span><span class="special">-</span><span class="identifier">to</span><span class="special">-</span><span class="identifier">boost</span>
	<span class="special">;</span>
		</pre>
<p>
          </p>
          </td>
</tr></tbody>
</table></div>
</div>
<br class="table-break"><p>
      Once the Boost library is properly configured, run 'bjam' to compile ODTONE.
    </p>
<p>
      Consult the Boost.Build documentation for more details!
    </p>
<a name="odtone.getStart.2__getting_odtone"></a><h4>
<a name="id3040909"></a>
      <a class="link" href="getStart.html#odtone.getStart.2__getting_odtone">2. Getting ODTONE</a>
    </h4>
<p>
      <span class="bold"><strong>In a tarball</strong></span>
    </p>
<p>
      You can get the ODTONE source code tarball from our project page, at <a href="http://helios.av.it.pt/projects/odtone/files" target="_top">http://helios.av.it.pt/projects/odtone/files</a>.
      Then just unpack it and you are ready to compile and install ODTONE.
    </p>
<p>
      <span class="bold"><strong>From the git repository</strong></span>
    </p>
<p>
      You can clone the git repository, from <a href="http://helios.av.it.pt/projects/odtone/git/" target="_top">ODTONE
      repository</a> therefore creating your own local copy.
    </p>
<pre class="programlisting"><span class="identifier">git</span> <span class="identifier">clone</span> <span class="identifier">http</span><span class="special">://</span><span class="identifier">helios</span><span class="special">.</span><span class="identifier">av</span><span class="special">.</span><span class="identifier">it</span><span class="special">.</span><span class="identifier">pt</span><span class="special">/</span><span class="identifier">projects</span><span class="special">/</span><span class="identifier">odtone</span><span class="special">/</span><span class="identifier">git</span><span class="special">/</span> <span class="identifier">odtone</span>
</pre>
<a name="odtone.getStart.3__compiling_and_installing_odtone"></a><h4>
<a name="id3041056"></a>
      <a class="link" href="getStart.html#odtone.getStart.3__compiling_and_installing_odtone">3. Compiling
      and installing ODTONE</a>
    </h4>
<p>
      Once you have obtained the ODTONE source code and have assured that you have
      the right dependencies installed in all machines you intend to use ODTONE,
      then you are ready to compile and install.
    </p>
<div class="table">
<a name="odtone.getStart.platform_support"></a><p class="title"><b>Table&#160;3.&#160;Platform Support</b></p>
<div class="table-contents"><table class="table" summary="Platform Support">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
          <p>
          </p>
          </th>
<th>
          <p>
            x86-32
          </p>
          </th>
<th>
          <p>
            x86-64
          </p>
          </th>
<th>
          <p>
            ARM
          </p>
          </th>
</tr></thead>
<tbody>
<tr>
<td>
          <p>
            Linux
          </p>
          </td>
<td>
          <p>
            <span class="inlinemediaobject"><img src=".././images/check.png" alt="check"></span>
          </p>
          </td>
<td>
          <p>
            <span class="inlinemediaobject"><img src=".././images/check.png" alt="check"></span>
          </p>
          </td>
<td>
          <p>
            <span class="inlinemediaobject"><img src=".././images/check.png" alt="check"></span>
          </p>
          </td>
</tr>
<tr>
<td>
          <p>
            Windows
          </p>
          </td>
<td>
          <p>
            <span class="inlinemediaobject"><img src=".././images/check.png" alt="check"></span>
          </p>
          </td>
<td>
          <p>
            <span class="inlinemediaobject"><img src=".././images/check.png" alt="check"></span>
          </p>
          </td>
<td>
          <p>
            <span class="inlinemediaobject"><img src=".././images/interrogation.png" alt="interrogation"></span>
          </p>
          </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="note" title="Note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
        <span class="bold"><strong>For Linux</strong></span>
      </p>
<p>
        We recommend GCC. Most distributions already come with the necessary pre-requisites,
        you may additionally need to install g++.
      </p>
<p>
        If you get link errors relative to undefined pthread symbols, this means
        that your compiler does not link to pthreads by default. You can either pass
        the "
        <em class="replaceable"><code>
          linkflags=-lpthread
        </code></em>
        " option to bjam. Or, you can also configure the toolset to link to
        this library, set "
        <em class="replaceable"><code>
          using gcc : : : &lt;linkflags&gt;-lpthread ;
        </code></em>
        " without quotes at your user-config.jam.
      </p>
</td></tr>
</table></div>
<div class="note" title="Note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
        <span class="bold"><strong>For Windows</strong></span>
      </p>
<p>
        We recommend MSVC. You will need to download and install the latest Windows
        SDK. This already comes with all pre-requisite libraries and toolchains.
      </p>
</td></tr>
</table></div>
<div class="note" title="Note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
        <span class="bold"><strong>For Android</strong></span>
      </p>
<p>
        Current Android Bionic headers are still too buggy to compile ODTONE. For
        example, the boost::asio::ip headers does no compile because of buggy &lt;netinet/in.h&gt;
        and &lt;netinet/in6.h&gt; headers.
      </p>
<p>
        However, since Android is based on linux, it is possible to compile ODTONE
        with the CodeSourcery GNU Toolchain for ARM Processors, at the expense of
        a bigger binary, since we have to link all libraries statically. The target
        must be arm-none-linux-gnueabi.
      </p>
<p>
        Prebuild binaries are available at <a href="http://www.codesourcery.com/sgpp/lite/arm" target="_top">CodeSourcery</a>
      </p>
<p>
        In order to setup user-config.jam for Android, you must add the following
        line (without quotes):
      </p>
<p>
        "
        <em class="replaceable"><code>
          using gcc : android : path-to-toolset/arm-none-linux-gnueabi-g++ : &lt;linkflags&gt;"-Wl,--whole-archive
          -lpthread -Wl,--no-whole-archive -lc" ;
        </code></em>
        "
      </p>
<p>
        To use the Android toolset, pass the command line option "
        <em class="replaceable"><code>
          toolset=gcc-android
        </code></em>
        " to bjam.
      </p>
<p>
        The Android SDK has the necessary tools to run, debug and deploy the ODTONE
        binaries.
      </p>
</td></tr>
</table></div>
<a name="odtone.getStart.4__generate_doxygen_documentation"></a><h4>
<a name="id3041395"></a>
      <a class="link" href="getStart.html#odtone.getStart.4__generate_doxygen_documentation">4. Generate
      Doxygen Documentation</a>
    </h4>
<p>
      As a supplement to this documentation, it is possible to generate incode documentation.
      This can be done using Doxygen that parses the sources and generates the documentation.
      Doxygen uses a configuration file to determine all of its settings.
    </p>
<p>
      To simplify the creation of a configuration file, Doxygen can create a template
      configuration file for you. To do this call Doxygen from the command line with
      the -g option:
    </p>
<pre class="programlisting"><span class="identifier">doxygen</span> <span class="special">-</span><span class="identifier">g</span> <span class="special">&lt;</span><span class="identifier">config</span><span class="special">-</span><span class="identifier">file</span><span class="special">&gt;</span>
</pre>
<p>
      To generate the documentation you can now enter:
    </p>
<pre class="programlisting"><span class="identifier">doxygen</span> <span class="special">&lt;</span><span class="identifier">config</span><span class="special">-</span><span class="identifier">file</span><span class="special">&gt;</span>
</pre>
<a name="odtone.getStart.odtone_user_guide"></a><h4>
<a name="id3041506"></a>
      <a class="link" href="getStart.html#odtone.getStart.odtone_user_guide">ODTONE User Guide</a>
    </h4>
<a name="odtone.getStart.configuration"></a><h5>
<a name="id3041523"></a>
      <a class="link" href="getStart.html#odtone.getStart.configuration">Configuration</a>
    </h5>
<p>
      <span class="bold"><strong>ODTONE-MIHF</strong></span>
    </p>
<p>
      For now the MIHFs capabilities are read from configuration files. Future versions
      will inquire the available Link SAPs for the required information. There are
      other parameters that can be configured either using an configuration file
      or passing them directly in command line.
    </p>
<pre class="programlisting"><span class="identifier">MIHF</span> <span class="identifier">Configuration</span> <span class="identifier">Options</span><span class="special">:</span>
   <span class="special">--</span><span class="identifier">help</span>                               <span class="identifier">Display</span> <span class="identifier">configuration</span> <span class="identifier">options</span>
   <span class="special">--</span><span class="identifier">conf</span><span class="special">.</span><span class="identifier">file</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="identifier">odtone</span><span class="special">.</span><span class="identifier">conf</span><span class="special">)</span>       <span class="identifier">Configuration</span> <span class="identifier">File</span>
   <span class="special">--</span><span class="identifier">conf</span><span class="special">.</span><span class="identifier">recv_buff_len</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">4096</span><span class="special">)</span>     <span class="identifier">Receive</span> <span class="identifier">Buffer</span> <span class="identifier">Length</span>
   <span class="special">--</span><span class="identifier">mihf</span><span class="special">.</span><span class="identifier">id</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="identifier">mihf</span><span class="special">)</span>                <span class="identifier">MIHF</span> <span class="identifier">Id</span>
   <span class="special">--</span><span class="identifier">mihf</span><span class="special">.</span><span class="identifier">ip</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">127.0</span><span class="special">.</span><span class="number">0.1</span><span class="special">)</span>           <span class="identifier">MIHF</span> <span class="identifier">Ip</span>
   <span class="special">--</span><span class="identifier">mihf</span><span class="special">.</span><span class="identifier">peers</span> <span class="identifier">arg</span>                     <span class="identifier">List</span> <span class="identifier">of</span> <span class="identifier">peer</span> <span class="identifier">MIHFs</span>
   <span class="special">--</span><span class="identifier">mihf</span><span class="special">.</span><span class="identifier">remote_port</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">4551</span><span class="special">)</span>       <span class="identifier">MIHF</span> <span class="identifier">Remote</span> <span class="identifier">Communications</span> <span class="identifier">Port</span>
   <span class="special">--</span><span class="identifier">mihf</span><span class="special">.</span><span class="identifier">local_port</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">1025</span><span class="special">)</span>        <span class="identifier">MIHF</span> <span class="identifier">Local</span> <span class="identifier">Communications</span> <span class="identifier">Port</span>
   <span class="special">--</span><span class="identifier">mihf</span><span class="special">.</span><span class="identifier">link_response_time</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">100</span><span class="special">)</span> <span class="identifier">MIHF</span> <span class="identifier">Link</span> <span class="identifier">Response</span> <span class="identifier">waiting</span> <span class="identifier">time</span> <span class="special">(</span><span class="identifier">milliseconds</span><span class="special">)</span>
   <span class="special">--</span><span class="identifier">mihf</span><span class="special">.</span><span class="identifier">link_delete</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">2</span><span class="special">)</span>          <span class="identifier">MIHF</span> <span class="identifier">Link</span> <span class="identifier">Response</span> <span class="identifier">fails</span> <span class="identifier">to</span> <span class="keyword">delete</span> <span class="identifier">the</span> <span class="identifier">Link</span> <span class="identifier">SAP</span>
   <span class="special">--</span><span class="identifier">enable_broadcast</span>                   <span class="identifier">MIHF</span> <span class="identifier">responds</span> <span class="identifier">to</span> <span class="identifier">broadcast</span> <span class="identifier">messages</span>
   <span class="special">--</span><span class="identifier">log</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">1</span><span class="special">)</span>                       <span class="identifier">MIHF</span> <span class="identifier">log</span> <span class="identifier">level</span> <span class="special">[</span><span class="number">0</span><span class="special">-</span><span class="number">4</span><span class="special">]</span>
</pre>
<div class="note" title="Note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
        <span class="bold"><strong>List of peer MIHF's</strong></span>
      </p>
<p>
        Comma separated list of remote MIHF's. If you want to test remote MIHF communication
        add an entry here with the IP address of the remote MIHF.
      </p>
<p>
        Usage: &lt;mihf id&gt; &lt;ip&gt; &lt;port&gt;
      </p>
<p>
        <span class="bold"><strong>List of Users SAPs</strong></span>
      </p>
<p>
        Comma separated list of local MIH User SAPs id's and ports. For the default
        demo just use as is.
      </p>
<p>
        Usage: &lt;user sap id&gt; &lt;port&gt;
      </p>
<p>
      </p>
</td></tr>
</table></div>
<p>
      <span class="bold"><strong>SAP's</strong></span>
    </p>
<pre class="programlisting"><span class="identifier">MIH</span> <span class="identifier">Usr</span> <span class="identifier">Configuration</span><span class="special">:</span>
   <span class="special">--</span><span class="identifier">help</span>                           <span class="identifier">Display</span> <span class="identifier">configuration</span> <span class="identifier">options</span>
   <span class="special">--</span><span class="identifier">conf</span><span class="special">.</span><span class="identifier">port</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">1234</span><span class="special">)</span>          <span class="identifier">Port</span>
   <span class="special">--</span><span class="identifier">conf</span><span class="special">.</span><span class="identifier">file</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="identifier">mih_usr</span><span class="special">.</span><span class="identifier">conf</span><span class="special">)</span>  <span class="identifier">Configuration</span> <span class="identifier">File</span>
   <span class="special">--</span><span class="identifier">conf</span><span class="special">.</span><span class="identifier">recv_buff_len</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">4096</span><span class="special">)</span> <span class="identifier">Receive</span> <span class="identifier">Buffer</span> <span class="identifier">Length</span>
   <span class="special">--</span><span class="identifier">mihf</span><span class="special">.</span><span class="identifier">ip</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">127.0</span><span class="special">.</span><span class="number">0.1</span><span class="special">)</span>       <span class="identifier">Local</span> <span class="identifier">MIHF</span> <span class="identifier">Ip</span>
   <span class="special">--</span><span class="identifier">mihf</span><span class="special">.</span><span class="identifier">id</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="identifier">local</span><span class="special">-</span><span class="identifier">mihf</span><span class="special">)</span>      <span class="identifier">Local</span> <span class="identifier">MIHF</span> <span class="identifier">Id</span>
   <span class="special">--</span><span class="identifier">user</span><span class="special">.</span><span class="identifier">id</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="identifier">user</span><span class="special">)</span>            <span class="identifier">User</span> <span class="identifier">Id</span>
   <span class="special">--</span><span class="identifier">mihf</span><span class="special">.</span><span class="identifier">local_port</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">1025</span><span class="special">)</span>    <span class="identifier">MIHF</span> <span class="identifier">Local</span> <span class="identifier">Communications</span> <span class="identifier">Port</span>
   <span class="special">--</span><span class="identifier">dest</span> <span class="identifier">arg</span>                       <span class="identifier">MIH</span> <span class="identifier">message</span> <span class="identifier">destination</span> <span class="identifier">of</span> <span class="identifier">MIH</span> <span class="identifier">User</span>


<span class="identifier">MIH</span> <span class="identifier">Link</span> <span class="identifier">SAP</span> <span class="identifier">Configuration</span><span class="special">:</span>
   <span class="special">--</span><span class="identifier">help</span>                           <span class="identifier">Display</span> <span class="identifier">configuration</span> <span class="identifier">options</span>
   <span class="special">--</span><span class="identifier">link</span><span class="special">.</span><span class="identifier">port</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">1234</span><span class="special">)</span>          <span class="identifier">Port</span>
   <span class="special">--</span><span class="identifier">link</span><span class="special">.</span><span class="identifier">tec</span> <span class="identifier">arg</span>                   <span class="identifier">Link</span> <span class="identifier">SAP</span> <span class="identifier">Technology</span>
   <span class="special">--</span><span class="identifier">link</span><span class="special">.</span><span class="identifier">link_addr_list</span> <span class="identifier">arg</span>        <span class="identifier">Link</span> <span class="identifier">SAP</span> <span class="identifier">Interface</span> <span class="identifier">Address</span>
   <span class="special">--</span><span class="identifier">link</span><span class="special">.</span><span class="identifier">event_list</span> <span class="identifier">arg</span>            <span class="identifier">List</span> <span class="identifier">of</span> <span class="identifier">supported</span> <span class="identifier">events</span>
   <span class="special">--</span><span class="identifier">link</span><span class="special">.</span><span class="identifier">command_list</span> <span class="identifier">arg</span>          <span class="identifier">List</span> <span class="identifier">of</span> <span class="identifier">supported</span> <span class="identifier">commands</span>
   <span class="special">--</span><span class="identifier">conf</span><span class="special">.</span><span class="identifier">file</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="identifier">link_sap</span><span class="special">.</span><span class="identifier">conf</span><span class="special">)</span> <span class="identifier">Configuration</span> <span class="identifier">File</span>
   <span class="special">--</span><span class="identifier">conf</span><span class="special">.</span><span class="identifier">recv_buff_len</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">4096</span><span class="special">)</span> <span class="identifier">Receive</span> <span class="identifier">Buffer</span> <span class="identifier">Length</span>
   <span class="special">--</span><span class="identifier">mihf</span><span class="special">.</span><span class="identifier">ip</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">127.0</span><span class="special">.</span><span class="number">0.1</span><span class="special">)</span>       <span class="identifier">Local</span> <span class="identifier">MIHF</span> <span class="identifier">Ip</span>
   <span class="special">--</span><span class="identifier">mihf</span><span class="special">.</span><span class="identifier">local_port</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="number">1025</span><span class="special">)</span>    <span class="identifier">MIHF</span> <span class="identifier">Local</span> <span class="identifier">Communications</span> <span class="identifier">Port</span>
   <span class="special">--</span><span class="identifier">mihf</span><span class="special">.</span><span class="identifier">id</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="identifier">local</span><span class="special">-</span><span class="identifier">mihf</span><span class="special">)</span>      <span class="identifier">Local</span> <span class="identifier">MIHF</span> <span class="identifier">Id</span>
   <span class="special">--</span><span class="identifier">link</span><span class="special">.</span><span class="identifier">id</span> <span class="identifier">arg</span> <span class="special">(=</span><span class="identifier">link</span><span class="special">)</span>            <span class="identifier">Link</span> <span class="identifier">SAP</span> <span class="identifier">Id</span>
</pre>
<div class="note" title="Note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
        <span class="bold"><strong>Link SAP Technology</strong></span>
      </p>
<p>
        Network interface card technology.
      </p>
<p>
        Usage: tec = &lt;NIC technology&gt;
      </p>
<p>
        <span class="bold"><strong>Link SAP Interface Address</strong></span>
      </p>
<p>
        Network interface card address.
      </p>
<p>
        Usage: link_addr_list = &lt;interface address&gt;
      </p>
<p>
        <span class="bold"><strong>Link SAP List of supported events</strong></span>
      </p>
<p>
        Comma separated list of the Link SAP's supported events.
      </p>
<p>
        Usage: event_list = &lt;link event 1&gt;, &lt;link event 2&gt;, (...), &lt;link
        event N&gt;
      </p>
<p>
        <span class="bold"><strong>Link SAP List of supported events</strong></span>
      </p>
<p>
        Comma separated list of the Link SAP's supported commands.
      </p>
<p>
        Usage: command_list = &lt;link command 1&gt;, &lt;link command 2&gt;, (...),
        &lt;link command N&gt;
      </p>
<p>
      </p>
</td></tr>
</table></div>
<a name="odtone.getStart.local_demo"></a><h5>
<a name="id3043425"></a>
      <a class="link" href="getStart.html#odtone.getStart.local_demo">Local Demo</a>
    </h5>
<p>
      The local demo consists in a simple experiment to demonstrate simple message
      exchange between a MIHF, a MIH_User and a Link_SAP. It allows you to see how
      events are generated by the Link_SAP and reported to a MIH_User that has subscribed
      to these events.
    </p>
<p>
      <span class="inlinemediaobject"><img src=".././images/local_demo.png" alt="local_demo"></span>
    </p>
<p>
      <span class="bold"><strong>Configuration</strong></span>
    </p>
<p>
      To run the local demo you will need to edit the default configuration file
      odtone.conf that is stored in the src/mihf directory. At Link SAP configuration
      file you will need to edit the interface address entrance and add the MAC address
      of your computer's network cards.
    </p>
<p>
      <span class="bold"><strong>Running Demo</strong></span>
    </p>
<p>
      After editing the configuration file, to run this ODTONE demo the best way
      is to open 3 terminals. On one terminal start ODTONE-MIHF and on the next terminal
      start the Link SAP. When Link SAP starts running, it will register with the
      local MIHF. Now it's time to start the MIH User, on your third terminal, and
      if all went well the MIH_User has requested an Capability_Discover to the local
      MIHF and printed out some information of the interfaces you previously configured.
    </p>
<p>
      Now it is time to send some Link indications to the MIHF and check that the
      MIH_User received notifications. So that the Link_SAP detects some events,
      you should now proceed to disconnect, disable or shutdown your network cable/interface
      or your wireless card according to your configuration file.
    </p>
<a name="odtone.getStart.remote_demo"></a><h5>
<a name="id3043510"></a>
      <a class="link" href="getStart.html#odtone.getStart.remote_demo">Remote Demo</a>
    </h5>
<p>
      The remote demo consists in a local MIH_User obtaining notifications of events
      that are happening on a Link_SAP remotely located on another machine. You are
      required to have two machines for this experiment. The first machine hosting
      an ODTONE-MIHF instance (mihf1) and the MIH_User, while the second will host
      a second ODTONE-MIHF instance (mihf2) and the Link_SAP.
    </p>
<p>
      <span class="inlinemediaobject"><img src=".././images/remote_demo.png" alt="remote_demo"></span>
    </p>
<p>
      <span class="bold"><strong>Configuration</strong></span>
    </p>
<p>
      As was said earlier, automatic remote peer MIHF discovery is not yet implemented,
      so you need to add the remote MIHF's IP address and port number to the configuration
      file. Edit the file and add an entry to peers in the form: &lt;mihf_id&gt;
      &lt;ip&gt; &lt;port&gt; where &lt;mihf_id&gt; is the identifier of the remote
      MIHF, &lt;ip&gt; and &lt;port&gt; are the IP address and port of the remote
      MIHF.
    </p>
<div class="note" title="Note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
        You need to edit the configuration file on both machines
      </p></td></tr>
</table></div>
<p>
      On the machine with the mihf1 the configuration file can look like:
    </p>
<pre class="programlisting"><span class="special">[</span><span class="identifier">mihf</span><span class="special">]</span>
<span class="identifier">id</span> <span class="special">=</span> <span class="identifier">mihf1</span>
<span class="identifier">local_port</span> <span class="special">=</span> <span class="number">1025</span>
<span class="identifier">remote_port</span> <span class="special">=</span> <span class="number">4551</span>
<span class="identifier">peers</span> <span class="special">=</span> <span class="identifier">mihf2</span> <span class="special">&lt;</span><span class="identifier">mihf1_IP_address</span><span class="special">&gt;</span> <span class="number">4551</span>
</pre>
<p>
      On the machine with the mihf2 the configuration file can look like:
    </p>
<pre class="programlisting"><span class="special">[</span><span class="identifier">mihf</span><span class="special">]</span>
<span class="identifier">id</span> <span class="special">=</span> <span class="identifier">mihf2</span>
<span class="identifier">local_port</span> <span class="special">=</span> <span class="number">1025</span>
<span class="identifier">remote_port</span> <span class="special">=</span> <span class="number">4551</span>
<span class="identifier">peers</span> <span class="special">=</span> <span class="identifier">mihf1</span> <span class="special">&lt;</span><span class="identifier">mihf2_IP_address</span><span class="special">&gt;</span> <span class="number">4551</span>
</pre>
<div class="note" title="Note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
        Note that using Android emulator, web traffic is routed through your development
        machine. So, the IP address assigned to Android emulator is the IP address
        of your machine. The development machine can be reached from Android emulator
        through 10.0.2.2.
      </p></td></tr>
</table></div>
<p>
      <span class="bold"><strong>Running Demo</strong></span>
    </p>
<p>
      On the machine hosting mihf1, start a terminal and run ODTONE-MIHF. Then, on
      another terminal start the MIH_User adding the parameter <span class="emphasis"><em>--dest mihf2</em></span>.
      The <span class="emphasis"><em>--dest</em></span> option tells the MIH_User to set the 802.21
      destination field of the frame to mihf2.
    </p>
<p>
      On the machine hosting mihf2, start a terminal and run ODTONE-MIHF. Then, on
      another terminal start the Link_SAP. So that the Link_SAP detects some events
      you should now proceed to disconnect, disable or shutdown your network cable/interface
      or you wireless card according to your configuration file.
    </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009 -2011 Universidade Aveiro<br>Copyright &#169; 2009 -2011 Instituto de Telecomunica&#231;&#245;es - P&#243;lo Aveiro<p>
        This software is distributed under a license. The full license agreement
        can be found in the LICENSE in this distribution. This software may not be
        copied, modified, sold or distributed other than expressed in the named license
        agreement. This software is distributed without any warranty.
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="intro.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="library.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
